package com.njtcedu.microblog.common.entity.dictionary;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class ArtLinePK implements Serializable {
	
	@Column(name = "userId", length = 255, nullable = false)
	private String userId;

	@Column(name = "providerId", length = 255, nullable = false)
	private String providerId;

	@Column(name = "rank", nullable = false)
	private Integer rank;

	public ArtLinePK() {
		super();
	}

	public String getProviderId() {
		return providerId;
	}

	public void setProviderId(String providerId) {
		this.providerId = providerId;
	}


	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	@Override
	public int hashCode() {
		int result = 1;
		result = null == providerId ? 0 + result : result + providerId.hashCode();
				
		result = null == userId ? 0 + result : result + userId.hashCode();
				
		result = null == rank ? 0 + result : result + rank.hashCode();
		return result;
	}

	@Override
	public boolean equals(Object object) {
		if (this == object)
			return true;
		if (object == null || getClass() != object.getClass())
			return false;

		ArtLinePK artLinePK = (ArtLinePK) object;

		return (providerId != null ? providerId.equals(artLinePK.providerId) : artLinePK.providerId == null) && (userId != null ? userId.equals(artLinePK.userId) : artLinePK.userId == null) && (rank != null ? rank.equals(artLinePK.rank) : artLinePK.rank == null);
				
	}
}
